import { postRegisterWithMobile } from './service';

export default {
  namespace: 'register',
  state: {},

  effects: {
    *registerWithMobile({ payload }, { call }) {
      const response = yield call(postRegisterWithMobile, payload);
      if (response.code === 1) {
        return Promise.resolve(response);
      }
      return Promise.reject(response.msg);
    },
  },

  reducers: {},
};
